#ifndef RENDERTARGET_H
#define RENDERTARGET_H

#include "D3D9Renderer.h"

class RenderTarget
{
public:
	RenderTarget();
	~RenderTarget();
	RenderTarget(RenderTarget& _RenderTarget);

	bool Create(UINT _width, UINT _length, D3DFORMAT _format);
	void ActivateTarget(DWORD targetIndex);
	void RevertTarget();

    IDirect3DTexture9* GetTexture();

private:
	IDirect3DTexture9* m_pTexture;
	LPDIRECT3DSURFACE9 m_pSurface;
	LPDIRECT3DSURFACE9 m_pOldRT;
	DWORD m_TargetIndex;

};

#endif